#include<iostream>
using namespace std;

int main()
{
	int a = 0, b = 0;
	cin >> a >> b;
	cout << b + (b - a) << endl;
	return 0;
}